package com.platform.module.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.platform.common.annotation.Excel;
import com.platform.common.annotation.Excels;
import com.platform.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

/**
 * 室温采集器资料对象 base_room_temp
 * 
 * @author wangqi
 * @date 2020-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("base_room_temp")
public class BaseRoomTemp extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 室温采集器ID */
    @NotBlank(message = "室温采集器ID不能为空")
    @Excel(name = "室温采集器ID")
    @TableId(type = IdType.INPUT)
    private String brtId;

    /** 室温采集器型号 */
    @Excel(name = "室温采集器型号")
    private String brtName;

    /** 安装地址 */
    @Excel(name = "安装地址")
    private String installAddress;

    /** 用户 */
    @Excel(name = "用户")
    private String brtUser;

    /** 电流 */
    @Excel(name = "电流")
    private String brtCurrent;

    /** 电压 */
    @Excel(name = "电压")
    private String brtVoltage;

    /** 温度 */
    @Excel(name = "温度")
    private String brtTemp;

    /** 湿度 */
    @Excel(name = "湿度")
    private String brtHumidity;

    /** 采集时间 */
    @Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date acquisitionTime;

    /** 厂商id */
    @Excel(name = "厂商id")
    private Long factoryId;

    /** 删除标志（0正常1删除） */
    private String delFlag;
    /** 厂商对象 */
    @Excels({
            @Excel(name = "厂商名称", targetAttr = "factoryName", type = Excel.Type.EXPORT),
            @Excel(name = "厂商代码", targetAttr = "factoryCode", type = Excel.Type.EXPORT)
    })
    @TableField(exist = false)
    private BaseFactory factory;

    @Excel(name = "厂商名称", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String factoryName;

    @TableField(exist = false)
    private List<TempRecord> tempRecordList;
    @TableField(exist = false)
    private BaseSubscriber subscriber;
    /** 地址id */
    @TableField(exist = false)
    private String subscriberId;

}
